from mapper.pojo import StockConcept
from database import sqlUtils
import tushare as ts


session = sqlUtils.get_sqlalchemy_session()
pro = ts.pro_api()
df = pro.concept()
d_len = df.shape[0]
for index in range(d_len):
    row = df.iloc[index]
    stock_concept = StockConcept.transfer(row)
    session.merge(stock_concept)
session.commit()
session.close()
